#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char* my_strstr(char* str1, char* str2)
{
	char* p1 = str1, * p2 = str2,*p3=NULL;
	int i = 0, j = 0;
	while (*(p1 + i) != '\0')
	{
		if (*(p1 + i) == *(p2 + j))
		{
			if(j==0)
				p3 = p1 + i;
			i++;
			j++;
			if (*(p2 + j) == '\0')
				return p3;
			continue;
		}
		else
		{
			j = 0;
		}
	}
	return NULL;
}
int main()
{
	char str1[] = "wuhanwenli";
	char str2[] = "hanwen";
	printf("%s", my_strstr(str1, str2));
	//printf("%s", strstr(str1, str2));
	return 0;
}